﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.BL.Entities;
using QUANLYCHAMCONG.DAO.DAO;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class MAYCHAMCONGBUS
    {
        public MAYCHAMCONGBUS() { }
        public static bool Insert(MAYCHAMCONG mcc)
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.Insert(mcc);
        }
        public static bool Update(MAYCHAMCONG mcc)
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.Update(mcc);
        }
        public static bool Delete(MAYCHAMCONG mcc)
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.Delete(mcc);
        }
        public static DataTable SelectAll()
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectAll(int? flag)
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.SelectALL(flag);
        }
        public static DataTable SelectPK(MAYCHAMCONG mcc)
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.SelectByPK(mcc);
        }
        public static DataTable SumMachineZK()
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return dao.SumMachineZK();
        }
        public static string GetID()
        {
            MAYCHAMCONGDAO dao = new MAYCHAMCONGDAO();
            return "MCC" + dao.GetID().ToString();
        }
    }
}
